	<p>Ranking <?php echo $this->history->id ?></p>
	<p>Crawler Time From: <?php echo $this->crawler->started_at; ?> To <?php echo $this->crawler->finished_at; ?>
	<table class="table-3" width="500px">
		<thead>
			<th>Rank</th> <th>Name</th> <th>Count</th> <th>Pos rank</th> <th>Pos count</th>
		</thead>
		<tbody>
		<?php 
		if(count($this->rankings) > 0):
			foreach ($this->rankings as $ranking):
		?>	
				<tr>
					<td>
						<?php echo $ranking->rank;?>
					</td>
					<td>
						<a class="keyword_ranking_menu" href="#<?php echo $this->history->id."-".$ranking->keyword_id ?>" ><?php echo $ranking->keyword_name;?></a>
					</td>
					<td>
						<?php echo $ranking->count;?>
					</td>
					<td>
						<?php echo $ranking->position_rank;?>
					</td>
					<td>
						<?php echo $ranking->position_count;?>
					</td>
				</tr>
		<?php 		
			endforeach;
		endif;
		
		?>
		</tbody>
	</table>
	<br/>
	<br/>


<script>
	var menu = {'page':'Page Ranking', 'website':'Website Ranking'};
	$(".keyword_ranking_menu").dContextMenu(menu, {'params':{'id':1,'b':2},'handle':'keyword_ranking_menu_handle'});

</script>
